package com.itheima.health.job;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * 定时任务实现类
 *
 * @author likeWen
 * @since 2022/11/24 18:15
 */
@Component
public class QNYOssScanClean {
    @Autowired
    private ClearImgJob clearImgJob;

    @Scheduled(cron = "0 * * * * ?") //  1分钟执行一次 直接在方法上使用注解即可完成扫描
    public void run() {
        clearImgJob.clearImg();
        System.out.println("----执行扫描一次1---");
    }
}
